<include file="../Public/head" />
<style>
    .fsort_do{ cursor: pointer}
</style>
<script>
    $(function($){
        $(".fsort_do").toggle(function(){
            $(this).html("-子分类");
            var rel=$(this).attr("rel");
            $(".fsort[rel="+rel+"]").after(son_ajax(rel));
        },function(){
            $(this).html("+子分类");
            var rel=$(this).attr("rel");
            $(".ssort[rel="+rel+"]").remove();
        })
    })
    function son_ajax(rel){
        var rs
        $.ajax(
            {
            type:"POST", url:"{:U('son')}?id="+rel,
            data:{},
            success:function(result){
                //alert(result.user)
                rs= result
            },
            dataType:"text",
            async:false
        }
      )
      return rs;
    }

</script>
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <form method="post">
  <include file="../Public/Search" />
       </form>
  <tr>
    <td><table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          	 <tr>
               <td height="20">
	              <input name="Submit2" type="button" class="right-button08" value="添加分类" onclick='link("{:U('addExpendSort')}");'/></td>
          	 </tr>
              <tr>
                <td height="40" class="font42">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
				 <tr class="CTitle" >
                    	<td height="22" colspan="7" align="center" style="font-size:16px">支出分类详细列表</td>
                  </tr>
                  <tr bgcolor="#EEEEEE">
				    <td width="4%" align="center" height="30">展开</td>
                    <td width="10%">分类名称</td>
					<td width="10%">总额</td>
					<td width="12%">管理</td>
                  </tr>
                  <foreach name="list" item="vo">
                      <tr bgcolor="#FFFFFF" rel="{$vo.sid}" class="fsort">
                          <td height="20" align="center"><span class="fsort_do" rel="{$vo.sid}">+子分类</span></td>
                          <td ><a href="listmokuaimingxi.htm" onclick=""></a>{$vo.name}</td>
                          <td>{$vo.allnumber|default=0}</td>
                          <td><a href="{:U('edit',array('id'=>$vo['sid']))}">修改</a>|<a href="{:U('del',array('id'=>$vo['sid']))}" onclick="return confirm('确认删除分类？删除后将无法恢复')">删除</a></td>
                        </tr>
                  </foreach>	  
				  
				  
				 
            </table></td>
        </tr>
      </table>
      <include file="../Public/page" />
          </td>
        </tr>
      </table></td>
  </tr>
</table>     

<include file="../Public/foot" />